import {getFileChildModel, getFileModel} from "@/utils/localStorageData";

const getters = {
    sidebar: state => state.app.sidebar,
    device: state => state.app.device,
    token: state => state.user.token,
    avatar: state => state.user.avatar,
    name: state => state.user.name,
    userInfo: state => state.user.userInfo,
    menus: state => state.menus.menus,
    permission_routes: state => state.permission.routes,
    sysDic: (state) => (str) => {
        let list = null
        if (state.sys.sysDic && str) {
            list = state.sys.sysDic[str]
        } else if (state.sys.sysDic && !str) {
            return state.sys.sysDic
        }
        return list
    },
    department: state => state.user.department,
    fileModel: state => state.sys.fileModel,
    fileChildModel: state => state.sys.fileChildModel,
}
export default getters
